import React,{ Component } from 'react'
import { 
    View,
    Text,
    StyleSheet,
    Image
} from 'react-native'

class ImageCard extends Component {
    static navigation = {
        title: 'Title'
    };

    constructor (props) {
        super(props);
    }

    componentWillMount () {
        
    }

    render () {
        return (
            <View style={{width:130,height:130,marginLeft:20,borderWidth:.5,borderColor:'#ddd'}}>
                <View style={{flex:2}}>
                    <Image source={this.props.imgUrl}
                        style={{flex:1,width:null,height:null,resizeMode:'cover'}}
                    />
                </View>
                <View style={{flex:1,paddingLeft:10,paddingTop:10}}>
                    <Text>{this.props.text}</Text>
                </View>
            </View>
        )
    }

}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
    }
});

export default ImageCard